Skip to content

fix(desktop): add opencode to default_agent_args for ACP support - #3706

Open
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/opencode-acp-argument
Open

fix(desktop): add opencode to default_agent_args for ACP support#3706
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/opencode-acp-argument

Conversation

@Chukwuebuka-2003

Copy link
Copy Markdown

Summary

The default_agent_args function was missing the opencode command identity. When a user selects the built-in OpenCode harness without specifying custom arguments, the agent launches without the required acp argument. This causes the ACP initialize to time out after 60 seconds.

Fixes #3660

Root cause

default_agent_args in desktop/src-tauri/src/managed_agents/discovery.rs maps command names to their default ACP arguments. OpenCode needs ["acp"] like Goose, but it was not listed — so normalize_agent_args returned an empty arg list when no user-defined args were stored on the record.

Normalization path when args are empty and no custom harness definition exists:

normalize_agent_args("opencode", []) → default_agent_args("opencode") → None → returns []

Fix

Added "opencode" => Some(vec!["acp".to_string()]) to default_agent_args.

Testing

cargo check --workspace   # compiles cleanly

Map the opencode command to the acp argument vector so the desktop
launcher treats it as an ACP agent. Folded into the existing goose arm
to keep discovery.rs within its file-size ratchet limit.

Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
@Chukwuebuka-2003
Chukwuebuka-2003 force-pushed the fix/opencode-acp-argument branch from b7140d1 to fb2cd52 Compare August 1, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opencode acp not working

1 participant